//
//  TerminalListener.h
//  macapp
//
//  Created by Cocoa on 2020/5/27.
//  Copyright © 2020 Talent. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TerminalListener : NSObject


- (instancetype)initWithProcessIdentifier:(NSNumber * _Nullable)processIdentifier;

@property (nonatomic, readonly) BOOL terminated;

/**
 If the process identifier provided was nil,
 then the completion block will invoke immediately with a YES success
 */
- (void)startListeningWithCompletion:(void (^)(BOOL success))completionBlock;

@end

NS_ASSUME_NONNULL_END
